package thread.codesynchronized;

public class Demo01TicketTask {
    public static void main(String[] args) {
        TicketTask ticketTask = new TicketTask();
        Thread thread01 = new Thread(ticketTask);
        thread01.setName("窗口A");
        Thread thread02 = new Thread(ticketTask);
        thread02.setName("窗口B");
        Thread thread03 = new Thread(ticketTask);
        thread03.setName("窗口C");
        Thread thread04 = new Thread(ticketTask);
        thread04.setName("窗口D");

        thread02.start();
        thread01.start();
        thread03.start();
        thread04.start();
    }
}
